Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(j-s): Fix e2e test #16227

Merged
merged 2 commits into from
Oct 2, 2024
Merged

fix(j-s): Fix e2e test #16227

merged 2 commits into from
Oct 2, 2024

Conversation

oddsson
Copy link
Member

@oddsson oddsson commented Oct 1, 2024

Fix e2e test

Asana

What

Update query selector to match the changes made in #16087.

Why

So that e2e tests will run.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • Bug Fixes
    • Updated input field identifiers for the defender's name in custody request tests.
    • Streamlined judge's decision submission process for consistency.
    • Confirmed defender's statement submission without access to prosecutor's files.
    • Clarified flow for prosecutor's extension requests, including defendant information handling.

@oddsson oddsson requested a review from a team as a code owner October 1, 2024 21:43
Copy link
Contributor

coderabbitai bot commented Oct 1, 2024

Walkthrough

The pull request introduces updates to the custody tests within the judicial system's end-to-end testing suite. Key modifications involve changing input field identifiers, streamlining the judge's decision submission process, confirming the defender's statement submission, and elaborating on the prosecutor's extension request. The overall flow of actions among the prosecutor, judge, defender, and court of appeals judge has been maintained to ensure consistency with the updated case handling logic.

Changes

Files Change Summary
apps/system-e2e/src/tests/judicial-system/regression/custody-tests.spec.ts - Updated input field identifier for defender's name from defenderName to advocateName.
- Streamlined judge's decision submission process.
- Confirmed defender's statement submission without access to prosecutor's case files.
- Elaborated on prosecutor's extension request process.

Possibly related PRs

Suggested labels

automerge

Suggested reviewers

  • unakb

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@oddsson oddsson added the automerge Merge this PR as soon as all checks pass label Oct 1, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
apps/system-e2e/src/tests/judicial-system/regression/custody-tests.spec.ts (1)

71-73: Consider using data-testid attributes for selectors

Reliance on IDs in selectors can lead to brittle tests if the HTML structure changes. Using data-testid attributes specifically designed for testing can make your tests more robust and maintainable.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 148403d and cc527f8.

📒 Files selected for processing (1)
  • apps/system-e2e/src/tests/judicial-system/regression/custody-tests.spec.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
apps/system-e2e/src/tests/judicial-system/regression/custody-tests.spec.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments (1)
apps/system-e2e/src/tests/judicial-system/regression/custody-tests.spec.ts (1)

71-73: LGTM!

The input field identifiers have been correctly updated from defenderName to advocateName, aligning with the changes made in PR #16087.

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.74%. Comparing base (a04a8cd) to head (0dbff32).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16227   +/-   ##
=======================================
  Coverage   36.74%   36.74%           
=======================================
  Files        6778     6778           
  Lines      139855   139855           
  Branches    39770    39770           
=======================================
+ Hits        51392    51395    +3     
+ Misses      88463    88460    -3     
Flag Coverage Δ
air-discount-scheme-backend 54.22% <ø> (ø)
air-discount-scheme-web 0.00% <ø> (ø)
api 3.37% <ø> (ø)
api-domains-air-discount-scheme 36.95% <ø> (ø)
api-domains-assets 26.71% <ø> (ø)
api-domains-auth-admin 48.77% <ø> (ø)
api-domains-communications 39.92% <ø> (ø)
api-domains-criminal-record 47.93% <ø> (ø)
api-domains-driving-license 44.48% <ø> (ø)
api-domains-education 31.74% <ø> (ø)
api-domains-health-insurance 34.78% <ø> (ø)
api-domains-mortgage-certificate 35.71% <ø> (ø)
api-domains-payment-schedule 41.22% <ø> (ø)
application-api-files 57.91% <ø> (ø)
application-core 71.29% <ø> (-0.25%) ⬇️
application-system-api 41.62% <ø> (ø)
application-template-api-modules 23.76% <ø> (+0.03%) ⬆️
application-templates-accident-notification 22.14% <ø> (ø)
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 26.63% <ø> (ø)
application-templates-driving-license 18.70% <ø> (ø)
application-templates-estate 12.33% <ø> (ø)
application-templates-example-payment 25.41% <ø> (ø)
application-templates-financial-aid 14.34% <ø> (ø)
application-templates-general-petition 23.68% <ø> (ø)
application-templates-health-insurance 26.62% <ø> (ø)
application-templates-inheritance-report 6.45% <ø> (ø)
application-templates-marriage-conditions 15.23% <ø> (ø)
application-templates-mortgage-certificate 43.96% <ø> (ø)
application-templates-parental-leave 30.03% <ø> (-0.13%) ⬇️
application-types 6.71% <ø> (ø)
application-ui-components 1.28% <ø> (ø)
application-ui-shell 21.29% <ø> (ø)
auth-nest-tools 31.31% <ø> (ø)
auth-react 22.80% <ø> (ø)
clients-charge-fjs-v2 24.11% <ø> (ø)
clients-driving-license 40.73% <ø> (ø)
clients-driving-license-book 43.90% <ø> (ø)
clients-financial-statements-inao 49.25% <ø> (ø)
clients-license-client 1.83% <ø> (ø)
clients-middlewares 73.02% <ø> (-0.09%) ⬇️
clients-regulations 42.71% <ø> (ø)
clients-rsk-company-registry 29.76% <ø> (ø)
clients-syslumenn 49.64% <ø> (ø)
cms 0.43% <ø> (ø)
cms-translations 39.05% <ø> (ø)
download-service 44.09% <ø> (ø)
financial-aid-backend 56.53% <ø> (ø)
icelandic-names-registry-backend 54.55% <ø> (ø)
judicial-system-api 18.30% <ø> (ø)
judicial-system-backend 55.29% <ø> (ø)
license-api 42.62% <ø> (-0.08%) ⬇️
nest-audit 68.20% <ø> (ø)
nest-feature-flags 51.95% <ø> (ø)
nest-problem 46.34% <ø> (ø)
nest-swagger 51.71% <ø> (ø)
portals-admin-regulations-admin 1.88% <ø> (ø)
portals-core 16.17% <ø> (ø)
reference-backend 50.41% <ø> (ø)
services-auth-admin-api 51.98% <ø> (ø)
services-auth-delegation-api 57.87% <ø> (ø)
services-auth-ids-api 51.88% <ø> (+0.01%) ⬆️
services-auth-personal-representative 45.55% <ø> (ø)
services-auth-personal-representative-public 41.60% <ø> (-0.04%) ⬇️
services-auth-public-api 49.37% <ø> (+0.01%) ⬆️
services-documents 61.17% <ø> (ø)
services-endorsements-api 55.22% <ø> (ø)
services-sessions 65.74% <ø> (ø)
services-university-gateway 48.52% <ø> (+0.02%) ⬆️
services-user-notification 47.07% <ø> (ø)
services-user-profile 62.19% <ø> (-0.08%) ⬇️
shared-components 27.68% <ø> (ø)
shared-form-fields 31.63% <ø> (ø)
skilavottord-ws 24.24% <ø> (ø)
web 1.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a04a8cd...0dbff32. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Oct 2, 2024

Datadog Report

All test runs a868be1 🔗

74 Total Test Services: 0 Failed, 72 Passed
🔻 Test Sessions change in coverage: 4 decreased, 2 increased, 194 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-backend 0 0 0 81 0 27.9s 1 no change Link
air-discount-scheme-web 0 0 0 2 0 9.02s 1 no change Link
api 0 0 0 4 0 2.94s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 19.47s N/A Link
api-domains-assets 0 0 0 3 0 12.33s N/A Link
api-domains-auth-admin 0 0 0 18 0 11.98s N/A Link
api-domains-communications 0 0 0 5 0 28.88s N/A Link
api-domains-criminal-record 0 0 0 5 0 8.94s N/A Link
api-domains-driving-license 0 0 0 23 0 29.77s N/A Link
api-domains-education 0 0 0 8 0 20.46s N/A Link

🔻 Code Coverage Decreases vs Default Branch (4)

  • clients-middlewares - jest 75.6% (-0.1%) - Details
  • application-core - jest 79.36% (-0.1%) - Details
  • application-templates-parental-leave - jest 35.31% (-0.1%) - Details
  • services-user-profile - jest 52.77% (-0.02%) - Details

@kodiakhq kodiakhq bot merged commit 0017501 into main Oct 2, 2024
196 checks passed
@kodiakhq kodiakhq bot deleted the j-s/fix-e2etests branch October 2, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants